
 /**
  *
  * This method is required by the EJB Specification,
  * but is not used by this example.
  *
  * Sets the session context.
  *
  * @param ctx - SessionContext Context for session
  */

 public void setSessionContext(SessionContext ctx){
   log("setSessionContext called");
   this.ctx = ctx;

   this.qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);

   try{
     this.qcon = qconFactory.createQueueConnection();
     this.qsession = qcon.createQueueSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
     this.queue = (Queue) ctx.lookup(QUEUE);
     this.qsender = qsession.createSender(queue);
     this.msg = qsession.createTextMessage();
     this.qcon.start();
     }catch(JMSException e){
            log( "JMSException in Inventory's set SessionContext" + e.toString() );
     }
 }